﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShivamEMR.Model.Domain.UIDomain;
using System.ComponentModel.DataAnnotations;

namespace ShivamEMR.Model.Domain.UserDomain
{
  public  class UserRight
    {
        #region Properties
        public int ID { get; set; }
        public string RightCode { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string Target { get; set; }
        public int Weight { get; set; }
        public string Notes { get; set; }       
        #endregion

        #region ForeignKeyProperties    
       //[ForeignKey("MenuItem")]
       // public Nullable<int> MenuID { get; set; }
        [ForeignKey("Type")]
        public int TypeID { get; set; }
      [ForeignKey("Group")]
        public int GroupID { get; set; }
        #endregion        

        #region NavigationalProperties   
        public virtual UserRightGroup Group { get; set; }
        public virtual UserRightType Type { get; set; }      
     //   public virtual Menu MenuItem { get; set; }
        public virtual ICollection<AccessPermission> Permissions { get; set; }     
       // public virtual ICollection<Menu>  Menus{ get; set; }      
        public virtual ICollection<UserRole> UserRoles { get; set; }       
        #endregion
    }
}
